Optimal. Leaf size=142 \[ \frac {2 a^{5/2} A \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{d}+\frac {2 a^3 (35 A+32 B) \sin (c+d x)}{15 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a^2 (5 A+8 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{15 d}+\frac {2 a B (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.27, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {3055, 3060,
2852, 212} \begin {gather*} \frac {2 a^{5/2} A \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{d}+\frac {2 a^3 (35 A+32 B) \sin (c+d x)}{15 d \sqrt {a \cos (c+d x)+a}}+\frac {2 a^2 (5 A+8 B) \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{15 d}+\frac {2 a B \sin (c+d x) (a \cos (c+d x)+a)^{3/2}}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2852
Rule 3055
Rule 3060
Rubi steps
\begin {align*} \int (a+a \cos (c+d x))^{5/2} (A+B \cos (c+d x)) \sec (c+d x) \, dx &=\frac {2 a B (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{5 d}+\frac {2}{5} \int (a+a \cos (c+d x))^{3/2} \left (\frac {5 a A}{2}+\frac {1}{2} a (5 A+8 B) \cos (c+d x)\right ) \sec (c+d x) \, dx\\ &=\frac {2 a^2 (5 A+8 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{15 d}+\frac {2 a B (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{5 d}+\frac {4}{15} \int \sqrt {a+a \cos (c+d x)} \left (\frac {15 a^2 A}{4}+\frac {1}{4} a^2 (35 A+32 B) \cos (c+d x)\right ) \sec (c+d x) \, dx\\ &=\frac {2 a^3 (35 A+32 B) \sin (c+d x)}{15 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a^2 (5 A+8 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{15 d}+\frac {2 a B (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{5 d}+\left (a^2 A\right ) \int \sqrt {a+a \cos (c+d x)} \sec (c+d x) \, dx\\ &=\frac {2 a^3 (35 A+32 B) \sin (c+d x)}{15 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a^2 (5 A+8 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{15 d}+\frac {2 a B (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{5 d}-\frac {\left (2 a^3 A\right ) \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{d}\\ &=\frac {2 a^{5/2} A \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{d}+\frac {2 a^3 (35 A+32 B) \sin (c+d x)}{15 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a^2 (5 A+8 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{15 d}+\frac {2 a B (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.43, size = 104, normalized size = 0.73 \begin {gather*} \frac {a^2 \sqrt {a (1+\cos (c+d x))} \sec \left (\frac {1}{2} (c+d x)\right ) \left (15 \sqrt {2} A \tanh ^{-1}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right )+(80 A+89 B+2 (5 A+14 B) \cos (c+d x)+3 B \cos (2 (c+d x))) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{15 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(312\) vs.
\(2(124)=248\).
time = 0.33, size = 313, normalized size = 2.20
method | result | size |
default | \(\frac {a^{\frac {3}{2}} \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (24 B \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\, \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-20 \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (A +4 B \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+90 A \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+15 A \ln \left (\frac {4 a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+4 \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+8 a}{2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right ) a +15 A \ln \left (-\frac {4 \left (a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-\sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-2 a \right )}{2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-\sqrt {2}}\right ) a +120 B \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\right )}{15 \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}\) | \(313\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 61, normalized size = 0.43 \begin {gather*} \frac {{\left (3 \, \sqrt {2} a^{2} \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 25 \, \sqrt {2} a^{2} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 150 \, \sqrt {2} a^{2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} B \sqrt {a}}{30 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 177, normalized size = 1.25 \begin {gather*} \frac {15 \, {\left (A a^{2} \cos \left (d x + c\right ) + A a^{2}\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - 4 \, \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) + 4 \, {\left (3 \, B a^{2} \cos \left (d x + c\right )^{2} + {\left (5 \, A + 14 \, B\right )} a^{2} \cos \left (d x + c\right ) + {\left (40 \, A + 43 \, B\right )} a^{2}\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{30 \, {\left (d \cos \left (d x + c\right ) + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.09, size = 202, normalized size = 1.42 \begin {gather*} \frac {\sqrt {2} {\left (48 \, B a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 40 \, A a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 160 \, B a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, \sqrt {2} A a^{2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}\right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 180 \, A a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 240 \, B a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} \sqrt {a}}{30 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (A+B\,\cos \left (c+d\,x\right )\right )\,{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{5/2}}{\cos \left (c+d\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________